unit uniRelClientes;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, QRCtrls, jpeg, QuickRpt, ExtCtrls, DB, ADODB;

type
  TfrmRelClientes = class(TForm)
    qrpRel: TQuickRep;
    QRBand1: TQRBand;
    QRLabel1: TQRLabel;
    QRLabel2: TQRLabel;
    qrImgCliente: TQRImage;
    qrbDetalhe: TQRBand;
    QRBand3: TQRBand;
    QRBand2: TQRBand;
    QRLabel14: TQRLabel;
    QRSysData2: TQRSysData;
    QRSysData1: TQRSysData;
    qrlUsuario: TQRDBText;
    QR_Rel: TADOQuery;
    DS_Rel: TDataSource;
    QRGrpPagamento: TQRGroup;
    QRLabel4: TQRLabel;
    qrlRazao: TQRLabel;
    QRLabel6: TQRLabel;
    qrlFantasia: TQRLabel;
    QRLabel7: TQRLabel;
    qrlContato: TQRLabel;
    QRLabel8: TQRLabel;
    qrlCPFCNPJ: TQRLabel;
    QRLabel5: TQRLabel;
    QRL: TQRLabel;
    qrlLogradouro: TQRLabel;
    qrlBairro: TQRLabel;
    QRLabel12: TQRLabel;
    QRLabel11: TQRLabel;
    qrlFone: TQRLabel;
    QRLabel15: TQRLabel;
    qrlFax: TQRLabel;
    QRLabel10: TQRLabel;
    qrlCidade: TQRLabel;
    QRLabel18: TQRLabel;
    qrlEmail: TQRLabel;
    QRLabel13: TQRLabel;
    QRLabel9: TQRLabel;
    qrlInscEstadual: TQRLabel;
    qrlComplemento: TQRLabel;
    qrlEstado: TQRLabel;
    QRLabel17: TQRLabel;
    qrlCEP: TQRLabel;
    QRLabel16: TQRLabel;
    qrlNumero: TQRLabel;
    qrlMarca: TQRLabel;
    QRLabel3: TQRLabel;
    qrlRepresentante: TQRLabel;
    procedure QRGrpPagamentoBeforePrint(Sender: TQRCustomBand;
      var PrintBand: Boolean);
    procedure qrbDetalheBeforePrint(Sender: TQRCustomBand;
      var PrintBand: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmRelClientes: TfrmRelClientes;

implementation

{$R *.dfm}

procedure TfrmRelClientes.QRGrpPagamentoBeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
begin
  qrlRazao.Caption := QR_Rel.FieldByName('razao').AsString;
  qrlFantasia.Caption := QR_Rel.FieldByName('fantasia').AsString;
  qrlRepresentante.Caption := QR_Rel.FieldByName('nome').AsString;
  qrlCPFCNPJ.Caption := QR_Rel.FieldByName('cnpj').AsString;
  qrlInscEstadual.Caption := QR_Rel.FieldByName('insc').AsString;
  qrlContato.Caption := QR_Rel.FieldByName('nome_contato').AsString;
  qrlLogradouro.Caption := QR_Rel.FieldByName('logradouro').AsString;
  qrlComplemento.Caption := QR_Rel.FieldByName('complemento').AsString;
  qrlNumero.Caption := QR_Rel.FieldByName('numero').AsString;
  qrlBairro.Caption := QR_Rel.FieldByName('bairro').AsString;
  qrlCidade.Caption := QR_Rel.FieldByName('cidade').AsString;
  qrlEstado.Caption := QR_Rel.FieldByName('uf').AsString;
  qrlCEP.Caption := QR_Rel.FieldByName('cep').AsString;
  qrlFone.Caption := QR_Rel.FieldByName('fone').AsString;
  qrlFax.Caption := QR_Rel.FieldByName('fax').AsString;
  qrlEmail.Caption := QR_Rel.FieldByName('email').AsString;
end;

procedure TfrmRelClientes.qrbDetalheBeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
begin
  qrlMarca.Caption := QR_Rel.FieldByName('descricao').AsString;
end;

end.
